<!--基础信息页面 -->
<div id="data-list">
	<div class="banner hidetree">
		<span class="base-blue-01 base-search iconfont icon-chazhaobiaodanliebiao" data-title='基础信息管理'>基础信息管理</span>
	</div>
	<div id="base-form" class="data-form" data-title='基础信息编辑'>
		<form id="form">
			<table class="base-table form">
				<input type='hidden' name='baseInfoId'>
				<tr>
					<td class="td-bg" width="150">系统标题</td>
					<td class="left"><input name="title"
						class="base-input validate require"></td>
					<td width="150">盐</td>
					<td><input type="text" name="salt"
						class="base-input validate require"></td>
				</tr>
				<tr>
					<td class="td-bg" width="150">单位名称</td>
					<td class="left"><input name="complay"
						class="base-input validate require"></td>
					<td width="150">电话号码</td>
					<td><input type="text" name="phoneNum"
						class="base-input validate require"></td>
				</tr>
				<tr>
					<td width="150">关键字</td>
					<td colspan="3"><textarea rows="" cols=""
							class="base-textarea" name="key"></textarea></td>
				</tr>
				<tr>
					<td width="150">描述</td>
					<td colspan="3">
						<textarea rows="" cols=""	class="base-textarea" name="description"></textarea>
					</td>
				</tr>
			</table>
		</form>
		<div class="toolbar buttom-btn">
			<button id="btn_save" type="button" class="base-btn base-bg-blue">
				保存</button>
		</div>
	</div>
	<!-- 
	<div class="banner hidetree">
		<span class="base-blue-01 base-search" data-title='图片管理'>图片管理</span>
	</div>
	<div id="base-form" class="data-form" >
		<form id="form2" enctype="multipart/form-data">
			<table class="base-table form">
				<input type='hidden' name='baseInfoId'>
				<tr>
					<td class="td-bg" width="150">系统标题</td>
					<td class="left"><input name="title"
						class="base-input validate require"></td>
					<td width="150">盐</td>
					<td><input type="text" name="salt"
						class="base-input validate require"></td>
				</tr>
				<tr>
					<td class="td-bg" width="150">公司名称</td>
					<td class="left"><input name="complay"
						class="base-input validate require"></td>
					<td width="150">电话号码</td>
					<td><input type="text" name="phoneNum"
						class="base-input validate require"></td>
				</tr>
				<tr>
					<td width="150">关键字</td>
					<td colspan="3"><textarea rows="" cols=""
							class="base-textarea" name="key"></textarea></td>
				</tr>
				<tr>
					<td width="150">描述</td>
					<td colspan="3"><textarea rows="" cols=""
							class="base-textarea" name="description"></textarea></td>
				</tr>
			</table>
		</form>
		<div class="toolbar buttom-btn">
			<button id="btn_save" type="button" class="base-btn base-bg-blue">
				保存</button>
		</div>
	</div>
	 -->
</div>
<script type="text/javascript">
	$(function() {
		$("body").getNiceScrolls({selected:[{"#data-list":110}]});
		//详情界面
        var my = {
                url: "/baseInfo/getDetail",
            	type:'get',
                callback: function(res) {
                	if(res.message !== "1"){
                		$.setValue(res.data);
                	}else{
                		layer.msg(res.message);
                	}
                }
        };
        $._NormalRequest(my);
		//保存方法
		$('#btn_save').on('click', function() {
			//表单校验
			var isTemp = $("#form").validateForm({
				msgPosition : 'right'
			});
			//分类处理
			if (isTemp) {
				var my = {
						form :"form",
						url : "/baseInfo/saveBase",
						callback : function(res) {
							layer.msg(res.message);
							if(res.code == '1'){
								$(".data-content").gotoNewLink({url:obj.data_list})
							}
						}
					}
					$._FormRequest(my);
			}
		});
	});
</script>
